<?php
namespace app\api\controller;

use app\api\model\ClubModel;
use think\Controller;

class Club  extends  Controller
{
    function  clublist(){
        $model=new  ClubModel();
        $result = $model->clublist();
        return json($result);

    }
    function clubdetail() {
        $clubid = input('get.clubid');
        $model = new ClubModel();
        $result = $model->clubdetail($clubid);
        if ($result) {
            return json_encode($result);
        }else {
            return  json_encode(['id'=>0]);
        }

    }
}